package net.zdreamer.geracomium.ui.more;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;

import com.example.geracomium.R;

import net.zdreamer.geracomium.ui.BaseActivity;
import net.zdreamer.geracomium.ui.MainActivity;

public class PersonalCenterActivity extends BaseActivity implements
        OnClickListener {
    private LinearLayout personal_news, personal_data, meal_Plan,
            personal_nurse, assessment_report, query_cost, query_Indent, query_photo;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);

    }

    @Override
    protected int getContentView() {
        return R.layout.activity_personal_center;
    }

    @Override
    protected void init() {
        personal_news = (LinearLayout) findViewById(R.id.personal_news);
        personal_data = (LinearLayout) findViewById(R.id.personal_data);
        meal_Plan = (LinearLayout) findViewById(R.id.meal_Plan);
        personal_nurse = (LinearLayout) findViewById(R.id.personal_nurse);
        assessment_report = (LinearLayout) findViewById(R.id.assessment_report);
        query_cost = (LinearLayout) findViewById(R.id.query_cost);
        query_Indent = (LinearLayout) findViewById(R.id.query_Indent);
        query_photo = (LinearLayout) findViewById(R.id.query_photo);
    }

    @Override
    protected void initViews() {
        // TODO Auto-generated method stub
        initTitle("个人中心", R.drawable.selector_title_back, 0, true, false);
    }

    @Override
    protected void initListener() {
        // TODO Auto-generated method stub
        findViewById(R.id.back).setOnClickListener(this);
        personal_news.setOnClickListener(this);
        personal_data.setOnClickListener(this);
        meal_Plan.setOnClickListener(this);
        personal_nurse.setOnClickListener(this);
        assessment_report.setOnClickListener(this);
        query_cost.setOnClickListener(this);
        query_Indent.setOnClickListener(this);
        query_photo.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        switch (v.getId()) {
            case R.id.back:
                Intent back_more = new Intent(PersonalCenterActivity.this,
                        MainActivity.class);
                startActivity(back_more);
                PersonalCenterActivity.this.finish();
                break;
            case R.id.personal_news:
                Intent news = new Intent(PersonalCenterActivity.this,
                        MessageNotificationActivity.class);
                startActivity(news);
                break;
            case R.id.personal_data:
                Intent date = new Intent(PersonalCenterActivity.this,
                        PersonalInformationActivity.class);
                startActivity(date);
                break;
            case R.id.meal_Plan:
                Intent meal = new Intent(PersonalCenterActivity.this, MealsPlanActivity.class);
                startActivity(meal);
                break;
            case R.id.personal_nurse:
                Intent nurse = new Intent(PersonalCenterActivity.this,
                        PersonalNurseActivity.class);
                startActivity(nurse);
                break;
            case R.id.assessment_report:
                Intent report = new Intent(PersonalCenterActivity.this,
                        PersonAsseReportActivity.class);
                startActivity(report);
                break;
            case R.id.query_cost:
                Intent coast = new Intent(PersonalCenterActivity.this,
                        CostNurseActivity.class);
                startActivity(coast);
                break;
            case R.id.query_Indent:
                Intent indent = new Intent(PersonalCenterActivity.this,
                        QueryIndentActivity.class);
                startActivity(indent);
                break;
            case R.id.query_photo:
                Intent photo = new Intent(PersonalCenterActivity.this, QueryPhotoActivity.class);
                startActivity(photo);
                break;
            default:
                break;
        }
    }

}
